<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQiiMemberDataTable extends Migration
{
    /**
     * Schema table name to migrate
     * @var string
     */
    public $set_schema_table = 'qii_member_data';

    /**
     * Run the migrations.
     * @table qii_member_data
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable($this->set_schema_table)) return;
        Schema::create($this->set_schema_table, function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('user_id');
            $table->string('username', 40)->default('')->comment('账户名');
            $table->unsignedBigInteger('phonenumber')->default('0')->comment('手机号');
            $table->string('pic', 180)->default('')->comment('会员头像');
            $table->string('sex', 10)->default('')->comment('性别');
            $table->string('address', 180)->default('')->comment('通讯地址');
            $table->string('email', 180)->default('')->comment('邮箱');
            $table->unsignedInteger('qq')->default('0')->comment('QQ号');
            $table->string('wechat', 50)->default('')->comment('微信号');
            $table->string('weibo', 50)->default('')->comment('微博');
            $table->string('interesting')->default('')->comment('兴趣爱好');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
     public function down()
     {
       Schema::dropIfExists($this->set_schema_table);
     }
}
